
const chartData = {
  "deliveryData": {
    "date": [
      "1月",
      "2月",
      "3月",
      "4月",
      "5月",
      "6月"
    ],
    "seriesData": [
      {
        "name": "目标",
        "data": [10, 4, 30, 40, 34, 22]
      },
      {
        "name": "达成",
        "data": [10, 6, 34, 40, 32, 20]
      }
    ],
    "legendData": ["目标", "达成"]
  },
  "recruitmentData": {
    "date": [
      "1月",
      "2月",
      "3月",
      "4月",
      "5月",
      "6月"
    ],
    "seriesData": [
      {
        "name": "简历数",
        "data": [320, 332, 301, 220, 182, 191]
      },
      {
        "name": "Offer发放",
        "data": [220, 182, 191, 220, 182, 191]
      },
      {
        "name": "成功入职",
        "data": [150, 232, 201, 232, 201, 154]
      }
    ],
    "legendData": ["简历数", "Offer发放", "成功入职"]
  }
}

const getChartData = (req, res) => {
  res.send({ error_code: 200, error_msg: 'OK', data: chartData });
}

const getDeliveryTarget = (req, res) => {
  res.send({
    error_code: 200, error_msg: 'OK', data: {
      "target": 10,
      "complete": 8,
      "nextTarget": 10
    }
  });
}

const getInterviewResults = (req, res) => {
  res.send({
    error_code: 200, error_msg: 'OK', data: {
      "pendingEmployment": 10,
      "alreadyEmployed": 8,
      "employmentFailure": 0
    }
  });
}

export default {
  'GET /api/dashboard/getChartData': getChartData,  //获取交付数据、招聘数据
  'GET /api/dashboard/getDeliveryTarget': getDeliveryTarget, //获取目标数据
  'GET /api/dashboard/getInterviewResults': getInterviewResults,//获取面试结果
}